import java.awt.*;

public class Plane extends State
{
    public Image getImage() {
        return image;
    }

    private final Image image;

    //设置图片
    public Plane(String imageName)
    {
        super.setName(imageName);
        image = Toolkit.getDefaultToolkit().getImage( Global.resourcesPath + imageName);
    }

    public void moveUp()
    {
        currentY -= moveStep;
    }

    public void moveDown()
    {
        currentY += moveStep;
    }

    public void moveLeft()
    {
        currentX -= moveStep;
    }

    public void moveRigth()
    {
        currentX += moveStep;
    }
}
